<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <link rel="stylesheet" href="/css/register.css">
</head>
<body>
<div class="registerDiv">
    <div id="logo"><img src="/images/demoLogo.png"></div>
    <div id="title">
        <div class="lo"><img src="/images/lo.png"></div>
        <div class="tit">注册之后探索最新科技</div>
    </div>
    <form autocomplete="off" method="post" action="/users/register">
        <div class="register_item">
            <span>用户名</span>
            <input id="username" name="username" placeholder="请输入用户名"/><br/>
        </div>
        <div class="register_item"><span>密码</span><input type="password" id="password" name="password" placeholder="请输入密码"/><br/></div>
        <div class="register_item"><span>重复密码</span><input type="password" id="rePassword" placeholder="重复输入密码"/><br/></div>
        <div class="register_item"><span>电子邮箱</span><input id="email" name="email" placeholder="请输入电子邮箱"/><br/></div>
        <div class="register_item"><span>移动电话</span><input id="IPhone" name="iphone" placeholder="请输入移动电话"/><br/></div>
        <div class="register_item code">
            <span>验证码</span>
            <input id="code" name="code" placeholder="6位验证码"/>
            <button id ="codeBtn" type="button" disabled="disabled">发送验证码</button>
            <br/>
        </div>
        <div class="register_item_b"><button type="submit">注册</button></div>
    </form>
</div>
<canvas height="926" width="1920" style="position: fixed; top: 0px; left: 0px; z-index: -1; opacity: 0.5;" id="c_n1"></canvas>
<script src="/js/jquery-1.12.4.js"></script>
<script src="/popBox/layer.js"></script>
<script src="/js/register.js"></script>
<script src="/js/zhihu.js"></script>
<script src="/js/gt.js"></script>
<script src="/js/jquery.cookie.js"></script>
<script>
    var handler = function (captchaObj) {
        captchaObj.onReady(function () {
            $("#wait").hide();
        }).onSuccess(function () {
            var result = captchaObj.getValidate();
            if (!result) {
                return alert('请完成验证');
            }

        });

        $('#codeBtn').click(function () {
            captchaObj.verify();
        })
    };


</script>
<script th:inline="javascript">
    $(function () {
        var msg = /*[[${msg}]]*/ null;
        if( msg != null){
            layer.msg(msg, {
                time: 2000, //20s后自动关闭
            });
        }
    });

</script>
</body>
</html>